package com.railway.field.service;

import com.railway.field.dao.RiskshowDao;
import com.railway.field.entity.Riskshow;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RiskshowService implements RiskshowDao {
    @Autowired
    private RiskshowDao riskshowDao;

    //增加安全隐患记录
    @Override
    public int InsertRiskshow(Map map) {
        return riskshowDao.InsertRiskshow(map);
    }

    //删除安全隐患记录
    @Override
    public int DeleteRiskshow(Map map) {
        return riskshowDao.DeleteRiskshow(map);
    }

    //分页模糊查询安全隐患记录
    @Override
    public List<Riskshow> FindRiskshow(Map map) {
        return riskshowDao.FindRiskshow(map);
    }

    //统计总数
    @Override
    public long Total(Map map) {
        return riskshowDao.Total(map);
    }

    //根据id查询安全隐患记录
    @Override
    public Riskshow FindRiskshowById(Map map) {
        return riskshowDao.FindRiskshowById(map);
    }




    //大屏展示统计图数据
    //根据隐患类型查询数量总数
    @Override
    public List<Riskshow> CountRiskshowByRiskId(Map map) {
        return riskshowDao.CountRiskshowByRiskId(map);
    }

    //根据分包单位查询数量总数
    @Override
    public List<Riskshow> CountRiskshowBySubId(Map map) {
        return riskshowDao.CountRiskshowBySubId(map);
    }

    //隐患详情
    @Override
    public List<Riskshow> Select_Riskshow_Month(Map map) {
        return riskshowDao.Select_Riskshow_Month(map);
    }
}
